<%@page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="html" tagdir="/WEB-INF/tags" %>
<!DOCTYPE html>
<html>
<html:header title="零售收银-取单">
    <link rel="stylesheet" href="${baseUrl}css/public.css" media="all">

    <style>
        .layui-input{
            font-size: 16px;
            border-color:#cccccc;
        }


        .layui-input:focus{border-color:#4287cf!important}
    </style>

    <script>
        jQuery(function () {
            $(window).focus();
            $('#password').focus();
            window.addEventListener("keydown", function(e) {
                if (e.keyCode == 0x0D){
                    enter();
                }
            }, false);

            $("#enter").click(function () {
                enter();
            });

        });



        function enter() {
            $(window).focus();
            $('#password').focus();
            let password = $('#password').val();
            if (password == "") {
                return;
            }
            post("${baseUrl}sale/retail/unLockRetail.action",{password:password},function (res) {
                $('#password').val('');
                if (res.code == 1){
                    closeAllDialog();
                } else {
                    errTip(res.msg);
                }
            });
        }

        function closeAllDialog() {
            parent.layer.close(parent.layer.getFrameIndex(window.name));
        }
    </script>
</html:header>
<body style="margin:0;background-color: #FFFFFF;height: 240px;width: 500px;padding-top: 60px;">

    <div style="color: #FF5722; width: 100%;text-align: center;font-size: 30px;font-weight: bold;padding-bottom: 20px;">当前零售收银已锁定</div>


    <div style="width: 274px;margin: 0 auto;margin-bottom: 6px;">
        <input type="password" id="password" class="layui-input" style="font-size: 14px;" placeholder="请输入密码解锁">
    </div>

    <div style="width: 274px;margin: 0 auto;">
        <button id="enter" class="layui-btn layui-btn-fluid layui-btn-normal">立即解锁(Enter)</button>
    </div>

</body>

</html>